dofile ("libCheckBox.lua")

CheckBox.init (1, 5, 5, "CheckBox 1", 'fillInBox', Color.new(31, 0, 0))
CheckBox.init (2, 5, 25, "CheckBox 2", 'crossInBox')
CheckBox.init (3, 5, 45, "CheckBox 3", 'vInBox', Color.new(0, 31, 31))
CheckBox.init (4, 5, 65, "CheckBox 4", 'crossInBox', Color.new(31, 16, 0))

while not Keys.newPress.Start do
   
  Controls.read()
  
  startDrawing()
    
    CheckBox.draw (1)
    CheckBox.draw (2)
    CheckBox.draw (3)
    CheckBox.draw (4)
    
    if CheckBox.selected (1) then
      screen.print (SCREEN_UP, 5, 5, "CheckBox 1 selected")
    end
    if CheckBox.selected (2) then
      screen.print (SCREEN_UP, 5, 25, "CheckBox 2 selected")
    end
    if CheckBox.selected (3) then
      screen.print (SCREEN_UP, 5, 45, "CheckBox 3 selected")
    end
    if CheckBox.selected (4) then
      screen.print (SCREEN_UP, 5, 65, "CheckBox 4 selected")
    end
    
  stopDrawing()

end

CheckBox.clear (1)
CheckBox.clear (2)
CheckBox.clear (3)
CheckBox.clear (4)

